using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class _AAWaiter : MonoBehaviour
{
    public _AAWaiter Wait(Action<GameObject, _AAWaiter> on)
    {
        _ONDestroy = on;return this;
    }
    Action<GameObject, _AAWaiter> _ONDestroy;
    private void OnDestroy()
    {
        _ONDestroy?.Invoke(gameObject,this);

    }

    private void OnDisable()
    {
        Destroy(this);
    }
}
